package cn.com.duiba.millionaire.center.api.dto;

import java.io.Serializable;

/**
 * Created by sunchangji on 2018/4/10.
 */
public class MillResultDto implements Serializable {
    private static final long serialVersionUID = 7882539871733477138L;

    /**
     * true:操作成功,false:操作失败
     */
    private boolean success;

    /**
     * 失败信息
     */
    private String message;

    public static MillResultDto fail(String message){
        MillResultDto resultDto = new MillResultDto();
        resultDto.setMessage(message);
        resultDto.setSuccess(false);
        return resultDto;
    }

    public static MillResultDto success(){
        MillResultDto resultDto = new MillResultDto();
        resultDto.setSuccess(true);
        return resultDto;
    }

    public boolean getSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
